<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">

	<head>
		<jsp:include page="/inc/easyui_css.jsp"></jsp:include>
		<jsp:include page="/inc/inc_css.jsp"></jsp:include>
	</head>
	<body>
	<jsp:include page="/inc/nav.jsp"></jsp:include>
		<div id="wrapper">
			<div id="content">
				<div class="left">
					<div class="info">
						<div class="hd">
							<h2>修改密码
							</h2>
						</div>
						<form id='form_act' action="/user/updatePwd" method="post">
							<div class="row">
								<label class="field">账号：
								</label>
								<div class="item">
									<input id="uname" class="basic-input" readonly="readonly" name="user.uname" maxlength="70" size="46"/><span style="color:red">*</span>
								</div>
							</div>
							<div class="row">
								<label class="field">旧密码：
								</label>
								<div class="item">
									<input id="pwd" class="basic-input easyui-validatebox" data-options="required:true" type="password" name="user.pwd" maxlength="70" size="46"/><span style="color:red">*</span>
								</div>
							</div>
							<div class="row">
								<label class="field">新密码：
								</label>
								<div class="item">
									<input id="newPwd" class="basic-input easyui-validatebox" data-options="required:true" type="password" name="user.newPwd" maxlength="70" size="46"/><span style="color:red">*</span>
								</div>
							</div>
							<div class="row">
								<label class="field">确认密码：
								</label>
								<div class="item">
									<input id="newPwd2" class="basic-input easyui-validatebox" data-options="required:true" type="password" name="user.newPwd2" maxlength="70" size="46"/><span style="color:red">*</span>
								</div>
							</div>
							<hr class="hrline"/>
							<div class="row footer">
								<div class="item">
									<input class="loc-btn" type="button" id="submit_form" value="提交"/>
									<input class="lnk-flat" type="button" id="cancel_form" value="取消"/>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<div id="footer"></div>
		<jsp:include page="/inc/inc_js.jsp"></jsp:include>
		<jsp:include page="/inc/easyui_js.jsp"></jsp:include>
		<script type="text/javascript">
			$(function(){
				var uid="<%=session.getAttribute("uid")%>";
				$.ajax({
					url : "/user/view/"+uid,
					success: function(r){
					
						$('#uname').val(r[0].uname);
					}
				});
				
				var msg="<%=request.getAttribute("msg")%>";
				if(msg!='null'&&msg!=''){
					$.messager.show({
						title:'提示',
						msg:msg,
						timeout:3000,
						showType:'slide'
					});
				}

				$('#submit_form').click(function(){
					$('#form_act').submit();
				});
				document.onkeydown = function(e){
				    var ev = document.all ? window.event : e;
				    if(ev.keyCode==13) {
				    	$('#form_act').submit();
					}
				}
			});
		</script>
	</body>
</html>